import request from '@/utils/request'

// 查询检测项目列表
export function listJcxm(query) {
  return request({
    url: '/lims/store/jcxm/list',
    method: 'get',
    params: query
  })
}

// 查询检测项目列表
export function listAllJcxm(query) {
  return request({
    url: '/lims/store/jcxm/jcxmList',
    method: 'get',
    params: query
  })
}


// 查询检测项目详细
export function getJcxm(jcxmId) {
  return request({
    url: '/lims/store/jcxm/' + jcxmId,
    method: 'get'
  })
}
// 查询检测方法列表
export function listMethod(query) {
  return request({
    url: '/lims/store/jcxm/methodList',
    method: 'get',
    params: query
  })
}
// 新增检测项目
export function addJcxm(data) {
  return request({
    url: '/lims/store/jcxm',
    method: 'post',
    data: data
  })
}

// 修改检测项目
export function updateJcxm(data) {
  return request({
    url: '/lims/store/jcxm',
    method: 'put',
    data: data
  })
}

// 删除检测项目
export function delJcxm(jcxmId) {
  return request({
    url: '/lims/store/jcxm/delete/' + jcxmId,
    method: 'delete'
  })
}

// 计量单位库同步
export function postJcxm() {
  return request({
    url: '/lims/store/jcxm/syn',
    method: 'post',
    timeOutValidate: false,
  })
}

// 计量单位库同步缓存
export function getJcxmStatus() {
  return request({
    url: '/lims/store/jcxm/status',
    method: 'get',
  })
}
